package com.woniuxy.school.dietary.comment.model.from;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@ApiModel(description = "添加评论表单")
public class AddCommentFrom {
    @NotNull(message = "商家ID不能为空")
    @ApiModelProperty(value = "商家ID")
    private Long storeId;

    @NotBlank(message = "评价内容不能为空")
    @ApiModelProperty(value = "评价内容")
    private String content;

    @NotBlank(message = "订单编号不能为空")
    @ApiModelProperty(value = "订单编号")
    private String orderNum;
    @ApiModelProperty(value = "图片")
    private MultipartFile file;
    @ApiModelProperty(value = "评分")
    @NotNull(message = "评分不能为空")
    @Min(value = 1, message = "评分不能小于1")
    @Max(value = 5, message = "评分不能大于5")
    private Integer storeScore;

}
